package com.itheima.health.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.codingapi.txlcn.tc.annotation.LcnTransaction;
import com.itheima.health.mapper.MemberMapper;

import com.itheima.health.pojo.Member;
import com.itheima.health.pojo.Order;
import com.itheima.health.service.MemberService;
import com.itheima.health.service.OrderService;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.Map;

@Service
@Transactional
public class MemberServiceImpl extends ServiceImpl<MemberMapper, Member> implements MemberService {

    @Override
    public Member findMemberByTelephone(String telephone) {
        return baseMapper.findMemberByTelephone(telephone);
    }

    @Override
    @LcnTransaction
    public int saveMember(Member member) {
        boolean save = save(member);
        System.out.println("sssssssssssssssss");
        Integer id = member.getId();
        return id;

    }
}